﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace GrayParrot.Web.Formly
{
    public class NumericTemplateOptionsAttribute : TextSizedTemplateOptionsAttribute
    {
        /// <summary>
        /// Gets or sets the minimum value...
        /// </summary>
        /// <value>
        /// The minimum.
        /// </value>
        [JsonProperty(PropertyName = "min", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public int Min { get; set; }

        /// <summary>
        /// Gets or sets the maximum value...
        /// </summary>
        /// <value>
        /// The maximum.
        /// </value>
        [JsonProperty(PropertyName = "max", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public int Max { get; set; }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>
        /// The value.
        /// </value>
        [JsonProperty(PropertyName = "value", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public double Value { get; set; }

        public NumericTemplateOptionsAttribute()
        {
            Value = double.MinValue;
        }
    }
}
